package cn.stylefeng.guns.modular.business.frequency.cmdriver.mapper;

import cn.stylefeng.guns.modular.business.frequency.cmcompany.model.param.CompanyDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.business.frequency.cmdriver.entity.CmDriver;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 通讯录司机表 Mapper 接口
 *
 * @author yujie
 * @date 2023/05/09 17:17
 */
public interface CmDriverMapper extends BaseMapper<CmDriver> {

    void deleteByCompanyId(@Param("companyId") String id);

    List<CmDriver> getDriverListPage(@Param("companyId") String companyId,
                                   @Param("companyDTO") CompanyDTO companyDTO,@Param("tenantId") Long tenantId);

    @Override
    int insert(CmDriver entity);

    int countByPhone(@Param("phone") String phone, @Param("id") Long id, @Param("tenantId") Long tenantId);

    void deleteDriver(@Param("id") String id);
}